const fs = require("fs");
const Elf = require("./Reftable");
const KaitaiStream = require('kaitai-struct/KaitaiStream');

// const fileContent = fs.readFileSync("0x000000000001-0x000000000001-79c60618.ref");
// const fileContent = fs.readFileSync("0x000000000001-0x000000000001-f5c93f89.ref");
// const fileContent = fs.readFileSync("0x000000000001-0x000000000002-f57ece88.ref");
const fileContent = fs.readFileSync("0x000000000001-0x00000000007d-eb45824c.ref");
const parsedElf = new Elf(new KaitaiStream(fileContent));
console.log(parsedElf);
// console.log(parsedElf.logBlocks.records[6].zlibDeflate.logRecords.records1);
// console.log("log_suffix_length: ", parsedElf.logBlocks.records[6].zlibDeflate.logRecords.records1.logSuffixLength);